﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PI_CS_Tools;

namespace  PI_CS_Library.Virtual_Network_Information_Model
{
    public class LinkConnection
    {
        Identification _id;
        Identification _linkId;
        Identification _networkConnectionId;
        CTP _srcPoint;
        CTP _sinkPoint;

        public LinkConnection(CTP _srcPoint, CTP _sinkPoint, Identification _linkId, Identification _networkConnectionId)
        {
            _id = new Identification("Link Connection: From: " + _srcPoint.ToString() + " To: " + _sinkPoint.ToString() + 
                " On: " + _linkId.Description + " Part of: " + _networkConnectionId.Description);
            this._srcPoint = _srcPoint;
            this._sinkPoint = _sinkPoint;
            this._linkId = _linkId;
            this._networkConnectionId = _networkConnectionId;
        }

        public Identification Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public CTP SrcPoint
        {
            get { return _srcPoint; }
            set { _srcPoint = value; }
        }

        public CTP SinkPoint
        {
            get { return _sinkPoint; }
            set { _sinkPoint = value; }
        }

        public Identification LinkId
        {
            get { return _linkId; }
            set { _linkId = value; }
        }

        public Identification NetworkConnectionId
        {
            get { return _networkConnectionId; }
            set { _networkConnectionId = value; }
        }

        public override string ToString()
        {
            return _id.Description;
        }
    }
}
